package com.toy.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 销售订单表
 * </p>
 *
 * @author zcy
 * @since 2025-10-31
 */
@TableName("sales_order")
public class SalesOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联库存ID
     */
    private Long inventoryId;

    /**
     * 销售平台
     */
    private String platform;

    /**
     * 买家信息
     */
    private String buyerInfo;

    /**
     * 销售价格
     */
    private BigDecimal salePrice;

    /**
     * 快递方式
     */
    private String shippingMethod;

    /**
     * 运费
     */
    private BigDecimal shippingCost;

    /**
     * 物流单号
     */
    private String trackingNumber;

    /**
     * 发货时间
     */
    private LocalDateTime shippingTime;

    /**
     * 签收时间
     */
    private LocalDateTime deliveryTime;

    /**
     * 支付方式
     */
    private String paymentMethod;

    /**
     * 是否收到款项
     */
    private Byte paymentReceived;

    /**
     * 收款时间
     */
    private LocalDateTime paymentTime;

    /**
     * 状态(pending/shipped/delivered/completed/returned)
     */
    private String status;

    /**
     * 利润计算
     */
    private BigDecimal profit;

    /**
     * 销售备注
     */
    private String notes;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getInventoryId() {
        return inventoryId;
    }

    public void setInventoryId(Long inventoryId) {
        this.inventoryId = inventoryId;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getBuyerInfo() {
        return buyerInfo;
    }

    public void setBuyerInfo(String buyerInfo) {
        this.buyerInfo = buyerInfo;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public String getShippingMethod() {
        return shippingMethod;
    }

    public void setShippingMethod(String shippingMethod) {
        this.shippingMethod = shippingMethod;
    }

    public BigDecimal getShippingCost() {
        return shippingCost;
    }

    public void setShippingCost(BigDecimal shippingCost) {
        this.shippingCost = shippingCost;
    }

    public String getTrackingNumber() {
        return trackingNumber;
    }

    public void setTrackingNumber(String trackingNumber) {
        this.trackingNumber = trackingNumber;
    }

    public LocalDateTime getShippingTime() {
        return shippingTime;
    }

    public void setShippingTime(LocalDateTime shippingTime) {
        this.shippingTime = shippingTime;
    }

    public LocalDateTime getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(LocalDateTime deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Byte getPaymentReceived() {
        return paymentReceived;
    }

    public void setPaymentReceived(Byte paymentReceived) {
        this.paymentReceived = paymentReceived;
    }

    public LocalDateTime getPaymentTime() {
        return paymentTime;
    }

    public void setPaymentTime(LocalDateTime paymentTime) {
        this.paymentTime = paymentTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigDecimal getProfit() {
        return profit;
    }

    public void setProfit(BigDecimal profit) {
        this.profit = profit;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "SalesOrder{" +
        "id = " + id +
        ", inventoryId = " + inventoryId +
        ", platform = " + platform +
        ", buyerInfo = " + buyerInfo +
        ", salePrice = " + salePrice +
        ", shippingMethod = " + shippingMethod +
        ", shippingCost = " + shippingCost +
        ", trackingNumber = " + trackingNumber +
        ", shippingTime = " + shippingTime +
        ", deliveryTime = " + deliveryTime +
        ", paymentMethod = " + paymentMethod +
        ", paymentReceived = " + paymentReceived +
        ", paymentTime = " + paymentTime +
        ", status = " + status +
        ", profit = " + profit +
        ", notes = " + notes +
        ", createTime = " + createTime +
        ", updateTime = " + updateTime +
        "}";
    }
}
